<?php

/**
 * This is the model class for table "announcement_assign".
 *
 * The followings are the available columns in table 'announcement_assign':
 * @property integer $member_id
 * @property integer $announcement_id
 * @property integer $purpose_join
 * @property integer $event_joined
 */
class AnnouncementAssign extends AnnouncementAssignBase
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return AnnouncementAssign the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'member_id' => 'Thành viên',
			'announcement_id' => 'Thông báo',
			'purpose_join' => 'Dự kiến tham dự',
			'event_joined' => 'Đã tham dự',
		);
	}


	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('member_id',$this->member_id);
		$criteria->compare('announcement_id',$this->announcement_id);
		$criteria->compare('purpose_join',$this->purpose_join);
		$criteria->compare('event_joined',$this->event_joined);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}